﻿<%@ Page Title="" Language="C#" MasterPageFile="~/module/Fontend.Master" AutoEventWireup="true" CodeBehind="TeacherConversation.aspx.cs" Inherits="mamnontuoitho7.module.TeacherConversation"  ValidateRequest="false"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<div class="accounts">
    <div class="login-name">
        <div class="login-name-left"></div>
        <span class="login-name-middle"><%= Session["fullname"].ToString()%></span>
        <div class="login-name-right"></div>
    </div>
    
    <div class="block-menu">
        <ul>
            <li class="active"><a href="TeacherConversation.aspx">Các cuộc hội thoại</a></li>
            <li><a href="TeacherKidList.aspx">Danh sách Bé</a></li>
            <li><a href="TeacherWarning.aspx">Thông báo</a></li>
            <li><a href="TeacherProfile.aspx">Thông tin tài khoản</a></li>
            <li><a href="ChangeAvatar.aspx">Thay đổi Avatar</a></li>
        </ul>
    </div>

    <div class="block-content">
       <%-- <div class="blockform">
            <h1 class="send-conversation">Viết cuộc thoại mới:</h1>
            <asp:TextBox ID="txtConversation" runat="server" TextMode="MultiLine"></asp:TextBox><br />
            <asp:Button ID="btnConversationSend" runat="server" CssClass="buttons" Text="Gửi" />
        </div>--%>
        <div class="blocktable">
            <h1 class="list-conversation">Các cuộc hội thoại:</h1>
            <table width="100%">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0" border="0" id="table" class="tinytable">
                            <thead>
                                <tr>
                                    <!--vị trí header list-->
                                    
                                    <th>
                                        <h3>
                                            <asp:Label ID="Label6" runat="server" Text='Tiêu đề'></asp:Label></h3>
                                    </th>
                                  
                                    <th>
                                        <h3>
                                            <asp:Label ID="Label1" runat="server" Text='Phụ huynh'></asp:Label></h3>
                                    </th>
                                    <th>
                                        <h3>
                                            <asp:Label ID="Label2" runat="server" Text='Ngày đăng'></asp:Label></h3>
                                    </th>
                                    
                                </tr>
                            </thead>
                            <tbody>
                                <!--vị trí content list-->
                                <%
                                    /* write code get datatable show into for loop */
                                for (int i = 0; i < _dt.Rows.Count; i++)
                                {
                                    if (_dt.Rows[i]["IsReadClass"].ToString() == "False")
                                    {
                                %>
                                    <tr style="background:#CFF;">
                                    <%}else {%>
                                    <tr>
                                    <%} %>
                                        <td>
                                            <a href="TeacherConversationDetails.aspx?ConversationID=<%=_dt.Rows[i]["ConversationID"].ToString()%>">
                                                <%=_general.ReplaceSpecialCharacters(_general.CutString(_dt.Rows[i]["Topic"].ToString(),220)) %>
                                            </a>
                                        </td>
                                        <td style="width: 140px; text-align:left;">
                                                <%=_dt.Rows[i]["FullName"].ToString()%>
                                        </td>
                                        <td style="width: 100px; text-align:center;">
                                            <%=DateTime.Parse(_dt.Rows[i]["CreateDate"].ToString()).ToString("dd/MM/yyyy")%>
                                        </td>
                                </tr>
                                <% } %>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </table>
        </div>  
    </div>


    <div id="container">
        <div class="pagination">
            <%if (_currentbar > 1)
              { %>
            <a href="TeacherConversation.aspx?a=-1" class="pageblue"><<</a>
            <%} %>
            <%  

                for (int j = _beginPage; j <= _endPage; j++)
                {
                    if (j == _pageflag)
                    {
            
            %>
            <a href="TeacherConversation.aspx?page=<%= j%>" class="pageblue active"><%= j%></a>
            <% }else
               { %>
            <a href="TeacherConversation.aspx?page=<%= j%>" class="pageblue"><%= j%></a>
            <%  }
                    } %>
            <%if (_currentbar < _totalBars)
              { %>
            <a href="TeacherConversation.aspx?a=1" class="pageblue">>></a>
            <%} %>
        </div>
    </div>
    <%--<div id="container">
        <div class="pagination">
            <a href="#" class="pageblue">first</a>
                <a href="#" class="pageblue">2</a>
                <a href="#" class="pageblue">3</a>
                <span class="pageblue active">4</span>
                <a href="#" class="pageblue">5</a>
                <a href="#" class="pageblue">6</a>
                <a href="#"class="pageblue">last</a>
         </div>
    </div>--%>
</div>
</asp:Content>
